/**
 * Dialogs, low visual impact dialogs (banners) CSS for mobile and desktop devices.
 */

/* Banner template */

.mega-banner-container {
    align-items: center;
    display: flex;
    justify-content: center;
    width: 100%;
}

.mega-banner-template {
    --mask-color: var(--text-color-high);
    background: var(--surface-main);
    bottom: 0;
    box-shadow: 0 4px 16px 0 rgb(0 0 0 / 0.1);
    box-sizing: border-box;
    color: var(--text-color-medium);
    display: flex;
    flex-direction: column;
    font: var(--text-body1);
    position: fixed;
    width: 100%;
    z-index: 1090;
}

.mega-banner-template.hidden {
    display: none;
}

/* close button */
.mega-banner-template button.close {
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    outline: none;
    padding: 0;
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 2010;
}

.rtl .mega-banner-template button.close {
    left: 16px;
    right: initial;
}

.mega-banner-template button.close i {
    --icon-size: 24px;
    margin: 0;
    opacity: 0.6;
    transition: opacity 200ms ease-in-out;
}

@media (hover: hover) {
    .mega-banner-template button.close i:hover {
        opacity: 0.8;
    }
}

.mega-banner-template > .content {
    align-items: center;
    display: flex;
    padding: 24px 80px;
}

.mega-banner-template .graphic {
    --width: 74px;
    height: 74px;
    flex: 0 0 auto;
    margin: 0 2px;
    margin-inline-end: 20px;
    width: 74px;
}

.mega-banner-template header {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
}

.mega-banner-template header h3 {
    color: var(--text-color-high);
    font: var(--text-body1-bold);
    margin: 0 0 8px;
    padding: 0;
}

.mega-banner-template header p {
    font: var(--text-body1);
    color: var(--text-color-medium);
    padding: 0;
    margin: 0;
}

.mega-banner-template header p a,
.mega-banner-template header p a:visited {
    color: var(--text-color-medium);
    text-decoration: underline;
}

@media (hover: hover) {
    .mega-banner-template header p a:hover {
        text-decoration: none;
    }
}

.mega-banner-template header .info {
    flex: 1 1 auto;
}

.mega-banner-template .buttons {
    display: flex;
    flex: 0 0  auto;
    margin-inline-start: 60px;
}

.mega-banner-template .buttons button ~ button {
    margin-inline-start: 16px;
}

/* Dialogs */

.mega-dialog-container.common-container {
    z-index: 1300;
}

/* for message dialog, but also potentiall other dialogs over common-dialogs as well */
.mega-dialog-container.common-container.arrange-to-back {
    z-index: 1000;
}
.mobile .mega-dialog-container.common-container.arrange-to-back {
    z-index: inherit;
}

.dialog-sprite, i.dialog-sprite,
.ui-datepicker-prev, .ui-datepicker-next
{
    background-image: url(../images/mega/dialog-sprite.png);
    background-repeat:  no-repeat;
}
.fm-dialog-title {
    font-size: 20px;
    line-height: 30px;
    color: #666;
    padding: 20px 48px 0 48px;
    text-align: center;
    min-height: 38px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
}
.fm-dialog-title.small {
    font-family: var(--text-font-family);
    font-size: 16px;
    line-height: 25px;
    letter-spacing: -0.18px;
    color: #666666;
}
.fm-dialog-title.medium {
    font-family: var(--text-font-family);
    font-size: 18px;
    color: #333;
    padding-top: 23px;
}
.fm-dialog-title.top-pad {
    padding-top: 30px;
}
.contrast .fm-dialog-title, .fm-dialog-title.dark {
    color: #333333;
}
.mobile .fm-dialog-title {
    padding-left: 25px;
    padding-right: 25px;
    white-space: normal;
}
.mobile .fm-dialog-title.medium {
    font-size: 16px;
}

/* Low resolution displays */

@media only screen and (max-width: 860px) {

    /* Cookie banner */

    .mega-banner-template > .content {
        padding: 24px 48px;
    }

    .mega-banner-template .buttons {
        margin-inline-start: 24px;
    }
}

@media only screen and (max-width: 720px) {

    /* Cookie banner */

    .mega-banner-template > .content {
        display: block;
        padding: 24px;
    }

    .mega-banner-template .buttons {
        justify-content: space-between;
        margin: 15px 0 0;
    }

    .mega-banner-template .buttons button {
        width: calc(50% - 6px);
    }
}

/* Mobile only */

/* Banner template */

.mobile .mega-banner-template {
    border-radius: 4px;
    bottom: 10px;
    box-shadow: 1px 1px 5px 0 rgb(147 147 147 / 0.5);
    left: 10px;
    width: calc(100% - 20px);
    z-index: 190;
}

.mobile .mega-banner-template button.close i {
    --icon-size: 20px;
}

.mobile .mega-banner-template header h3 {
    font-size: 13px;
}

.mobile .mega-banner-template header p {
    font: var(--text-body2);
}

/* Mobile dialogs */

.mobile .mega-dialog-container .mega-dialog {
    overflow: scroll;
    -webkit-overflow-scrolling: touch;
}

.mobile .mega-dialog-container .mega-dialog:not(.fullsize-on-mobile) {
    max-height: calc(100% - 30px);
    width: calc(100% - 30px);
    max-width: 768px;
}

.mobile .mega-dialog-container .mega-dialog.fullsize-on-mobile {
    width: 100%;
    height: 100%;
}

/* Email verification required */
.mega-dialog.verify-email .content-block {
    text-align: center;
}
.mega-dialog.verify-email .content-block .text {
    margin-bottom: 16px;
}
.mega-dialog.verify-email .content-block .text strong {
    font-family: var(--text-font-family);
    font-weight: 600;
}
.mega-dialog.dialog-template-action.verify-email > header .graphic {
    height: 79px;
    margin-bottom: 0;
}
.mobile .mega-dialog.verify-email * {
    font-family: var(--mobile-font-family-main);
}
.mobile .mega-dialog.verify-email .content-block .text strong {
    font: var(--mobile-font-copy-semibold);
}
.mobile .mega-dialog.verify-email > header .graphic {
    background-image: url("../images/mobile/warning-3d.png");
    background-size: contain;
    width: 96px;
    height: 96px;
}
.mobile .mega-dialog.verify-email > header h2 {
    font: var(--mobile-font-heading-h1);
    text-align: left;
}
.mobile .mega-dialog.verify-email .content-block {
    color: var(--mobile-text-primary);
    font: var(--mobile-font-copy-regular);
    text-align: left;
}
.mobile .mega-dialog.verify-email .mega-button {
    border-radius: var(--mobile-border-radius-medium);
    max-width: var(--mobile-elem-max-width);
    width: 100%;
    font: var(--mobile-font-link-large-regular);
}
.mobile .mega-dialog.verify-email footer button.positive {
    background: var(--mobile-button-primary);
    color: var(--mobile-text-inverse);
}
.mobile .mega-dialog.verify-email footer button.positive span {
    font-weight: var(--mobile-font-weight-semibold);
}
.mobile .mega-dialog.dialog-template-action.verify-email > header {
    padding: 24px 24px 16px;
}
.mobile .mega-dialog.dialog-template-action.verify-email > header .graphic {
    margin: 0 0 24px;
}
.mobile .mega-dialog.dialog-template-action.verify-email .content-block {
    padding: 0 24px;
}
.mobile .mega-dialog.dialog-template-action.verify-email > footer .footer-container {
    justify-content: flex-start;
    padding: 8px 24px 24px;
}
.mobile .mega-dialog.dialog-template-action.verify-email > footer button.large {
    margin: 0;
}
/* end of Email verification required */

/* Login to account if account has been suspended */
.mega-dialog.type-480px227 {
    max-width: 480px;
}
.login-set-pass.content-block {
    padding: 22px 35px 35px 35px;
    font: var(--text-body1);
    color: var(--text-color-high);
    text-align: center;
}
.login-set-pass .text {
    padding: 2px 0 18px 0;
}
.login-set-pass .dialog-login-form {
    margin-top: 9px;
}
.mobile .mega-dialog.type-480px227 {
    max-width: 100%;
}
.mobile .login-set-pass .text {
    padding-bottom: 5px;
}
.mobile .login-set-pass .dialog-login-form.low-pad {
    margin-top: -10px;
}
.mobile .login-set-pass .text {
    padding: 2px 0 10px 0;
}
.mobile .account.dialog-login-form-low-pad {
    margin-top: -5px;
}
.mobile .login-set-pass .dialog-login-form {
    margin-top: 0;
}
.mobile .login-set-pass .dialog-top-icon.locked-account {
    margin-bottom: 5px;
}
.mobile .type-480px227 .mega-input.title-ontop {
    margin-bottom: 10px;
}
.mobile .login-set-pass button {
    margin-top: 0;
}

/* end of Login to account if account has been suspended */


@media only screen and (orientation: landscape) {
    .mobile .verify-email.header {
        padding-top: 14px;
    }
}

/* minimal styling to make shared mega-dialogs work */

.mobile .mega-dialog-container {
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    left: 0;
    top: 0;
    z-index: 100;
    pointer-events: none;
}

.mobile .mega-dialog-container > * {
    pointer-events: initial;
}

.mobile .mega-dialog {
    position: absolute;
    background: var(--mobile-page-background);
    z-index: 99;
}

.mobile .mega-dialog:not(.fullsize-on-mobile) {
    border-radius: 24px;
}

.mobile .mega-dialog.fullsize-on-mobile {
    border-radius: 0;
}

.mobile .mega-dialog .content-block {
    background: var(--mobile-page-background);
}

.mobile .mega-dialog footer {
    text-align: center;
}

.mobile .mega-dialog aside {
    min-height: 24px;
}

.mobile .mega-dialog .mega-button {
    height: 48px;
    line-height: 48px;
    display: inline-block;
    min-width: 128px;
    font-size: 14px;
    border-radius: 4px;
    padding: 0 25px;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    white-space: nowrap;
    outline: none;
    appearance: none;
    border: none;
}

.mobile .mega-dialog .mega-button.disabled {
    opacity: 0.4;
}

.mobile .mega-dialog .mega-button::before {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.15);
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: inherit;
}

.mobile .mega-dialog footer button.positive,
.mobile .mega-dialog .mega-button.positive {
    background: linear-gradient(to bottom, #00bfa5 0%, #00a690 100%);
    color: white;
}

/* verify-email */

    .mobile .verify-email button.close {
        display: none;
    }

/* end verify-email */

/* verify-email-login-to-account */

    .mobile .verify-email-login-to-account button.close {
        display: none;
    }

    .mobile .verify-email-login-to-account header h2 {
        font-size: 16px;
        text-align: center;
        line-height: 24px;
        margin-bottom: 0;
        font-family: var(--text-font-family);
    }

    .mobile .verify-email-login-to-account .content-block {
        padding: 10px 25px 25px 25px;
    }

    .mobile .verify-email-login-to-account .dialog-top-icon.locked-account {
        margin: 16px auto;
    }

/* end verify-email-login-to-account */

/* verify-email-set-new-pass */

    .mobile .verify-email-set-new-pass button.close {
        display: none;
    }

    .mobile .verify-email-set-new-pass header h2 {
        font-size: 16px;
        text-align: center;
        line-height: 24px;
        margin-bottom: 0;
        font-family: var(--text-font-family);
        margin-top: 18px;
    }

    .mobile .verify-email-set-new-pass .content-block {
        padding: 10px 25px 25px 25px;
    }

/* end verify-email-set-new-pass */

@media only screen and (max-height: 600px) {
    .mega-dialog > section {
        flex-shrink: 0;
    }

    /* Exclude chat dialogs */
    .fm-modal-dialog .mega-dialog > section {
        flex-shrink: unset;
    }
}
